About Align EASY
Align EASY is a little Visual Basic 4.0 add-in program, that helps you align and distribute controls relative to other controls or form (30 functions + undo).

If you use it for your own fun or for developing freeware/PD stuff, it´s free of charge, otherwise if designing commercial software or shareware, it´s shareware and costs $10 US.

I don´t add here long “bla bla bla” or so called license, because you probably don´t hurry reading it. So please accept my efforts to bring you some useful utilities and if you are one of them to whom this app is shareware and you hope getting some money from users of your own programs, please send me some bucks. Thanks.

Align EASY is Copyright 1996, Ahto Tanner. All Rights Reserved. No any warranty.


Installation
Installing of this add-in is simple:

1.	Uncompress files from distribution zip to directory of your choice.

2.	If you are not using VB 4.0 Professional or you haven’t Sheridan 3D Controls OCX already installed then copy files regsvr32.exe & threed32.ocx to your Windows\System directory. Then run regsvr32.exe with command line switch threed32.ocx (i.e. “regsvr32 threed32.ocx”). You can also drag threed32.ocx file to regsvr32.exe in Explorer and release button, this also registers new custom control.

 If you don’t know whether Sheridan 3D Controls are installed, you can go to point 3 and run align32.exe. If controls are not installed, program shows error message, but if all is OK, it just runs.

3.	Run the file align32.exe once so it is registered in Windows registry and in vb.ini “Add-ins 32” sections.

4.	Next time you’ll run Visual Basic, new toolbar will be automatically visible. You can turn it on/off from add-in manager.

If you don’t like Align EASY or want to uninstall it on any reason, follow the steps below:

1.	Make sure Align EASY is not loaded (uncheck “Align EASY - control alignment toolbar” from add-in manager.

2.	Run align32.exe with command line switch /uninstall. This removes all entries from windows registry and vb.ini file.

3.	If you installed threed32.ocx, you can unregister it by using “regsvr32.exe /u threed32.ocx” command.

4.	Delete Align EASY files from your hard disk.


How it works

This control alignment utility is organized as toolbar. It has 14 buttons, but some of them perform multiple actions while you press it CONTROL or ALT key down. If you right-click toolbar with mouse, popup menu will appear. There you can choose to undo last action, display help or options dialog etc.

If you remember next points you will get most out of Align EASY:

 Buttons in upper row align/distribute controls to/between leftmost or/and rightmost selected control.

 Buttons in lower row align/distribute controls to/between topmost or/and lower selected control.

 Some controls perform desired action relative to form when you press the button while Ctrl key is holded down. For example you can align all selected controls to left/center/right of form, or you can distribute 5 selected buttons with equal spaces between them to form’s width (default w/o Ctrl is between left- & rightmost selected control). For complete description of each button and it’s possibilities, see toolbar help topic.

 Alt key has also some very useful actions. For complete description of each button and it’s possibilities, see toolbar help topic.

 The most powerful button for alignment and resize is “Copy Properties” [image] button. It does not require alignment to left-/right-/topmost control and aligns any controls to arbritary control. Use it whenever you can! See this button’s description for more information.

 You can switch on/off undo from configuration dialog. Switching undo off will decrease performance, but... :-)


Toolbar

Click on some button for explanation:

Be sure to check out useful tips!

 If you need certain add-in and can’t find it anywhere, then you must write it yourself.


Configuration

Click on some object for explanation:

 You can display this dialog when you choose “Options...” from pop-up menu, which is invoked after right-clicking on toolbar.


Known issues

Here are some issues, that are not implemented in this version:

 Parent controls. Embed controls doesn’t align to non-embed controls. If you use “Copy properties” button to copy alignment properties and source control has different parent, then destination controls will be aligned relative to their parent.

 Resizing listboxes etc. As you already know, different kind of list and combo boxes have fixed height, so you cannot make them any size you want. Distributing functions doesn’t follow this rule :(

 Alignment order. While distributing, new position is calculated so that next control is taken next in creation order (not that which is in next position). This causes sometimes big mess, but you can say “oops!” and undo this action. This is now biggest issue :((

I believe this is the last version of this add-in so don’t hope to get these problems fixed. Reason is simple - I discovered Delphi 2.0 to be much better development tool as Visual Basic, so my effort go for learning it :-). VB version 4.0 is NOT as progressive as I hoped, so its time to mooooooove...


"Space between" dialog
“Space between” dialog

Click on some object for explanation:


If checked, saves changes like window position, always on top etc. so next time you run program, window has the same position and state as when you closed it.


If checked, alignment toolbar will be visible automatically each time you start Visual Basic, so you don´t need to manually start it from add-ins menu.


If checked, you can use undo button on toolbar to undo your last action. You notice, that if undo is enabled, it takes a little time before selected controls are aligned. This is because program needs to save previous position and size of every selected control. This option is added if you need quick action and are sure not to make wrong button clicks :-)


Write here the default width of objects you want to apply while pressing [image] button.


Write here the default height of objects you want to apply while pressing [image] button.


Here is default value that is used between two controls when distributing controls on form or by largest control.


If checked, forces “Space Between” dialog to be displayed next time you press distribution buttons [image] or [image]. This is useful when you are disabled displaying mentioned dialog and use default value from above text box.


Here is default value that is used between two controls when distributing controls on form or by largest control.


If you check this checkbox, “Space Between” dialog are not displayed any more and the value in above text box is used as default value.

 Nevertheless you can force to display this dialog even you are disabled this dialog by holding down ALT key while pressing distribution buttons [image] or [image].


 Align left

Aligns selected controls to the leftmost control in the selection.

 Aligns selected controls to form’s left side.


 Centre horizontally

Centres selected controls horizontally by rightmost control in the selection.

 Centres selected controls horizontally on form.

 Centres selected controls (group) as one unit horizontally on form.


 Align right

Aligns selected controls to the rightmost control in the selection.

 Aligns selected controls to form’s right side.


 Distribute & resize by widest

Distributes selected controls horizontally by the widest selected control. You can specify default space between controls in options window or if you want, each time you click this button, the “Space Between” dialog is displayed, hold down ALT key.

 Distributes selected controls horizontally to the form’s width

 Forces to show the “Space Between” dialog. Useful if you have disabled it by default, but need it sometimes to be displayed.

 You can make a temporary control with required width for distributing other controls by this width and then delete it.

Example:


 Distribute between first & last

Distributes selected controls horizontally between leftmost and rightmost selected control. This doesn’t resize objects and is useful for distributing check boxes with different sizes etc.

Example:

 Distributes controls so that the space between them is equal.

Example:


 Make same width

Makes all selected controls the same width as the leftmost selected control.

 Makes all selected controls the same width as the current form.


 Make default width & height

Makes all selected controls default width and height as defined in options dialog. Useful if you want to make all command buttons in your application the same size so they look better. It’s good idea to use the same sizes as in Windows’ dialogues, looks like the width is 1125 and height is 345 pixels :-)

 You can change default width & height in configuration dialog.


 Align top

Aligns selected controls to the top of topmost control in the selection.

 Aligns selected controls to form’s top.


 Centre vertically

Centres selected controls vertically by topmost control in the selection.

 Centres selected controls vertically on form.

 Centres selected controls (group) as one unit vertically on form.


 Align bottom

Aligns selected controls to the bottom of lower control in the selection.

 Aligns selected controls to form’s lower edge.


 Distribute & resize by highest

Distributes selected controls vertically by the highest control in selection. You can specify default space between controls in options window or if you want, each time you click this button, the “Space Between” dialog is displayed.

 Distributes selected controls vertically to the form’s height.

 Forces to show the “Space Between” dialog. Useful if you have disabled it by default, but need it sometimes to be displayed.

 You can make a temporary control with required height for distributing other controls by this height and then delete it.

See example of button above this (and rotate your head 90 degrees ;-)


 Distribute between top & bottom

Distributes selected controls horizontally between topmost and lower selected control. This doesn’t resize objects and is useful for distributing check boxes with different sizes etc.

 Distributes controls so that the space between them is equal.

See example of button above (and rotate your monitor 90 degrees! ;-)


 Make same height

Makes all selected controls the same height as the topmost selected control.

 Makes all selected controls the same height as the current form.


Copy properties button
 Copy properties

This is the most powerful alignment/resize button on toolbar. It works similar to MS Word’s Format painter tool - first select control from which you want to pick up properties (left, top, width, height, center, color etc.) and then you can paste these picked properties to any other controls of your choice on the same or on other form.

1.	Select one control from which you want to copy some properties (i.e. width for making other controls same width)

2.	Press this button (it remains to pressed down state) and copy properties dialog box appear, where you can choose which properties to pick up. If you have checked all properties you want, then press OK.

3.	Now select any other controls that will get these copied properties. Controls may be in any order and you can also select controls on other form.

4.	Press this button second time and selected controls will get new properties and resize/move to new position. If some of them doesn’t support certain property (for example ForeColor) it is just ignored.

 Use this tool for any alignment/resize that is not relative to form - it’s much better and easy to use than other buttons on toolbar.


MsgBox EASY

This is powerful MsgBox function code generator. You can: save your message boxes and reuse them, paste code directly to VB, use your own variables, constants etc, comment/uncomment block of code with one mouse click, automatically generate Select Case block for responding user choices, and so on... ... and it’s free like this one :-)

Both 16 and 32 bit versions available. For more info and downloading visit my homepage.


WinHelp template

This is template for MS Word 6/7 with styles and little toolbar for designing help files. It’s not complete help workshop, but simplifies beginners creating help files. Help file with full source also included. Free of charge stuff...

For more info and downloading visit my homepage.


Contacting author

If you want mail me with bugs, suggestions, or just if you want to say that you like (don’t like :-) it, feel free to pass your message to:

ahto@estpak.ee

Check out also my homepage in WWW, where you can download other stuff and new releases:

http://www.estpak.ee/~ahto

Money (only cash please) to:

Ahto Tanner
Karja 2-58
EE2820 Paide
ESTONIA